package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName student
 */
@TableName(value ="student")
@Data
public class Student implements Serializable {
    /**
     * 
     */
    @TableId
    private String studentId;

    /**
     * 
     */
    private String name;

    /**
     * 
     */
    private String gender;

    /**
     * 
     */
    private Date birthDate;

    /**
     * 
     */
    private Date enrollmentDate;

    /**
     * 1-研一, 2-研二, 3-研三
     */
    private Integer grade;

    /**
     * 
     */
    private String major;

    /**
     * 
     */
    private String advisorId;

    /**
     * 
     */
    private String politicalStatus;

    /**
     * 档案是否在研究生处
     */
    private Integer isArchived;

    /**
     * 是否休学
     */
    private Integer isSuspended;

    /**
     * 上年度综合素质评价结果
     */
    private String lastEvaluation;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Student other = (Student) that;
        return (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
            && (this.getBirthDate() == null ? other.getBirthDate() == null : this.getBirthDate().equals(other.getBirthDate()))
            && (this.getEnrollmentDate() == null ? other.getEnrollmentDate() == null : this.getEnrollmentDate().equals(other.getEnrollmentDate()))
            && (this.getGrade() == null ? other.getGrade() == null : this.getGrade().equals(other.getGrade()))
            && (this.getMajor() == null ? other.getMajor() == null : this.getMajor().equals(other.getMajor()))
            && (this.getAdvisorId() == null ? other.getAdvisorId() == null : this.getAdvisorId().equals(other.getAdvisorId()))
            && (this.getPoliticalStatus() == null ? other.getPoliticalStatus() == null : this.getPoliticalStatus().equals(other.getPoliticalStatus()))
            && (this.getIsArchived() == null ? other.getIsArchived() == null : this.getIsArchived().equals(other.getIsArchived()))
            && (this.getIsSuspended() == null ? other.getIsSuspended() == null : this.getIsSuspended().equals(other.getIsSuspended()))
            && (this.getLastEvaluation() == null ? other.getLastEvaluation() == null : this.getLastEvaluation().equals(other.getLastEvaluation()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getBirthDate() == null) ? 0 : getBirthDate().hashCode());
        result = prime * result + ((getEnrollmentDate() == null) ? 0 : getEnrollmentDate().hashCode());
        result = prime * result + ((getGrade() == null) ? 0 : getGrade().hashCode());
        result = prime * result + ((getMajor() == null) ? 0 : getMajor().hashCode());
        result = prime * result + ((getAdvisorId() == null) ? 0 : getAdvisorId().hashCode());
        result = prime * result + ((getPoliticalStatus() == null) ? 0 : getPoliticalStatus().hashCode());
        result = prime * result + ((getIsArchived() == null) ? 0 : getIsArchived().hashCode());
        result = prime * result + ((getIsSuspended() == null) ? 0 : getIsSuspended().hashCode());
        result = prime * result + ((getLastEvaluation() == null) ? 0 : getLastEvaluation().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", studentId=").append(studentId);
        sb.append(", name=").append(name);
        sb.append(", gender=").append(gender);
        sb.append(", birthDate=").append(birthDate);
        sb.append(", enrollmentDate=").append(enrollmentDate);
        sb.append(", grade=").append(grade);
        sb.append(", major=").append(major);
        sb.append(", advisorId=").append(advisorId);
        sb.append(", politicalStatus=").append(politicalStatus);
        sb.append(", isArchived=").append(isArchived);
        sb.append(", isSuspended=").append(isSuspended);
        sb.append(", lastEvaluation=").append(lastEvaluation);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}